package com.wanxi.util;

import com.wanxi.model.UserModel;

import java.util.HashMap;
import java.util.Map;

public class Test {
    public static void main(String[] args) {
        String str = "username=111&password=1234567";
        Map<String, String> map = new HashMap<>();
        String[] split = str.split("&");
        UserModel model=new UserModel(split[0].split("=")[1],split[1].split("=")[1]);
        System.out.println(model);
//        for (int i = 0; i < split.length; i++) {
//            map.put(split[i].split("=")[0], split[i].split("=")[1]);
//        }
//        System.out.println(map);
    }
}
